.tags {
  width: 180px;
  flex-grow: 0;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;

  &,
  #tags-content {
    background-color: var(--sn-stylekit-secondary-background-color);
    display: flex;
    flex-direction: column;
  }

  .tags-title-section {
    color: var(--sn-stylekit-secondary-foreground-color);
    padding-top: 15px;
    padding-bottom: 8px;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 12px;
  }

  .scrollable {
    height: 100%;
  }

  .infinite-scroll {
    overflow-x: hidden;
    height: inherit;

    // Autohide scrollbar on Windows.
    @at-root {
      .windows-web &,
      .windows-desktop & {
        overflow-y: hidden;
        &:hover {
          overflow-y: auto;
          overflow-y: overlay; // overlay is not supported on ff, so keep previous statement up
        }
      }
    }
  }

  .no-tags-placeholder {
    padding: 0px 12px;
    font-size: 12px;
    opacity: 0.4;
    margin-top: -5px;
  }

  .tag {
    min-height: 30px;
    padding: 5px 12px;
    cursor: pointer;
    transition: height 0.1s ease-in-out;
    position: relative;

    > .tag-info {
      height: 20px;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;

      > .tag-icon {
        width: 10px;
        opacity: 0.2;
        font-size: var(--sn-stylekit-font-size-h2);
        font-weight: bold;
        margin-right: 6px;
      }

      > .title {
        width: 80%;
        background-color: transparent;
        font-weight: 600;
        color: var(--sn-stylekit-secondary-foreground-color);
        border: none;
        cursor: pointer;
        text-overflow: ellipsis;
        width: 75%;

        // Required for Safari to avoid highlighting when dragging panel resizers
        // Make sure to undo if it's selected (for editing)
        -webkit-user-select: none;

        &.editing {
          -webkit-user-select: text !important;
        }

        &:focus {
          outline: 0;
          box-shadow: 0;
        }

        pointer-events: none;
      }

      > .count {
        padding-right: 4px;
        padding-top: 1px;
        font-weight: bold;
        color: var(--sn-stylekit-neutral-color);
        min-width: 35px;
        text-align: right;
      }
    }

    > .menu {
      font-size: 11px;

      > .item {
        margin-right: 2px;
      }

      opacity: 0.5;
      font-weight: bold;
      clear: both;
      margin-top: 2px;
      margin-bottom: 2px;

      &:hover {
        opacity: 1;
      }
    }

    &.selected {
      > .tag-info {
        .title {
          cursor: text;
        }
      }
    }

    &:hover:not(.selected),
    &.selected {
      background-color: var(--sn-stylekit-secondary-contrast-background-color);
      color: var(--sn-stylekit-secondary-contrast-foreground-color);

      > .title {
        color: var(--sn-stylekit-secondary-contrast-foreground-color);
      }
    }
  }
}
